﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ModifyCustomerOld.aspx.cs"
    Inherits="ZX.WebApp.Crm.Customer.ModifyCustomerOld" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link rel="stylesheet" type="text/css" href="../../scripts/yui_2.9.0/build/container/assets/skins/sam/container.css" />
    <link rel="stylesheet" type="text/css" href="../../scripts/yui_2.9.0/build/button/assets/skins/sam/button.css" />
    <link rel="stylesheet" type="text/css" href="../../scripts/yui_2.9.0/build/layout/assets/skins/sam/layout.css" />
    <link rel="stylesheet" type="text/css" href="../../Scripts/yui_2.9.0/build/datatable/assets/skins/sam/datatable.css" />
    <link rel="stylesheet" type="text/css" href="../../Scripts/yui_2.9.0/build/resize/assets/skins/sam/resize.css" />
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/yahoo-dom-event/yahoo-dom-event.js"></script>
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/element/element-min.js"></script>
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/datasource/datasource-min.js"></script>
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/json/json-min.js"></script>
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/connection/connection-min.js"></script>
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/dragdrop/dragdrop-min.js"></script>
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/get/get-min.js"></script>
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/datatable/datatable-min.js"></script>
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/paginator/paginator-min.js"></script>
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/layout/layout-min.js"></script>
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/button/button-min.js"></script>
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/container/container-min.js"></script>
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/resize/resize-min.js"></script>
    <script src="../../Scripts/jquery-1.6.min.js" type="text/javascript"></script>
    <script src="../../Scripts/jquery.json-2.2.js" type="text/javascript"></script>
    <script src="../../Scripts/Jquery.form.js" type="text/javascript"></script>
    <script src="../../Scripts/extend.validate.js" type="text/javascript"></script>
    <script src="../../Scripts/CombinButton.js" type="text/javascript"></script>
    <link href="../../Styles/base.css" rel="stylesheet" type="text/css" />
    <link href="../../Styles/extendTable.css" rel="stylesheet" type="text/css" />
</head>
<body class="yui-skin-sam" onkeydown="PreventBSK()">
    <form id="form1" runat="server">
    <div>
        <div id="content">
            <h3>
                客户基本信息</h3>
            <table class="table1">
                <tr>
                    <th>
                        <span style="color: Red">*</span><span>客户名称</span>
                    </th>
                    <td colspan="3">
                        <input runat="server" type="text" id="CustomerName" name="CustomerName" onkeydown="showSetNum('CustomerName','ShowCustoemrName',50)"
                            onkeyup="showSetNum('CustomerName','ShowCustoemrName',50)" onblur="ValidateCustomerName(this.value,'客户名称','CustomerName','ShowCustoemrName');"
                            class="width30" />
                        <img id="btnCheckCustomerName" onclick="CheckCustomerName()" title="检查客户名称是否可用?"
                            alt="检查客户名称是否可用?" src="../../Images/search01.png" style="cursor: hand; vertical-align: bottom;" />
                        <img id="btnBaiduSearch_CustomerName" onclick="fnBaiduSearch('CustomerName');" title="百度搜索" alt="百度搜索" src="../../Images/baidu.png"
                            style="cursor: hand; vertical-align: bottom;" />
                        <img id="btnGoogleSearch_CustomerName" onclick="fnGoogleSearch('CustomerName');" title="Google搜索" alt="Google搜索" src="../../Images/google.png"
                            style="cursor: hand; vertical-align: bottom;" />
                        <span class="span_font">(0-50字)请填写完整公司全称</span> <span class="span_font" id="ShowCustoemrName">
                        </span>
                    </td>
                </tr>
                <tr>
                    <th>
                        <span style="color: Red">*</span><span>公司地址</span>
                    </th>
                    <td colspan="3">
                        <asp:DropDownList ID="State" name="State" runat="server" AppendDataBoundItems="true">
                            <asp:ListItem Value="中国">中国</asp:ListItem>
                        </asp:DropDownList>
                        <asp:DropDownList ID="Province" name="Province" runat="server" AppendDataBoundItems="true">
                            <asp:ListItem Value=" ">选择省份</asp:ListItem>
                        </asp:DropDownList>
                        <asp:DropDownList ID="City" name="City" runat="server" AppendDataBoundItems="true">
                            <asp:ListItem Value=" ">选择城市</asp:ListItem>
                        </asp:DropDownList>
                        <asp:DropDownList ID="Area" name="Area" runat="server" AppendDataBoundItems="true">
                            <asp:ListItem Value=" ">选择区县</asp:ListItem>
                        </asp:DropDownList>
                        <input runat="server" type="text" id="Address" name="Address" onkeydown="showSetNum('Address','ShowAddress',100)"
                            onkeyup="showSetNum('Address','ShowAddress',100)" onblur="showSetNull('ShowAddress')"
                            style="width: 21%;" />
                        <span class="span_font" id="ShowAddress"></span>
                    </td>
                </tr>
                <tr>
                    <th width="14%">
                        <span style="color: Red">*</span><span>决策人姓名</span>
                    </th>
                    <td width="36%">
                        <input runat="server" type="text" id="Decisionmaker" onblur="IsChinese(this.value,'决策人','Decisionmaker')"
                            size="30" maxlength="30" name="Decisionmaker" class="width35" />
                    </td>
                    <th>
                        <span style="color: Red">*</span><span>决策人性别</span>
                    </th>
                    <td>
                        <asp:DropDownList ID="DecisionSex" name="DecisionSex" runat="server" class="width38">
                            <asp:ListItem Value=""> </asp:ListItem>
                            <asp:ListItem Value="M">男</asp:ListItem>
                            <asp:ListItem Value="F">女</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <th width="14%">
                        <span style="color: Red">*</span><span>决策人手机1</span>
                    </th>
                    <td width="36%">
                        <input type="text" runat="server" id="DecisionTel" name="DecisionTel" onkeypress="return(event.keyCode>47&&event.keyCode<58)"
                            onpaste="return !clipboardData.getData('text').match(/\D/)" maxlength="20" class="width35" />
                        <img id="btnDecisionTel" onclick="CheckDecisionTel(1)" title="检查决策人手机是否存在?" alt="检查决策人手机是否存在?"
                            src="../../Images/search01.png" style="cursor: hand; vertical-align: bottom;" />
                        <img id="btnBaiduSearch_DecisionTel" onclick="fnBaiduSearch('DecisionTel');" title="百度搜索" alt="百度搜索" src="../../Images/baidu.png"
                            style="cursor: hand; vertical-align: bottom;" />
                        <img id="btnGoogleSearch_DecisionTel" onclick="fnGoogleSearch('DecisionTel');" title="Google搜索" alt="Google搜索" src="../../Images/google.png"
                            style="cursor: hand; vertical-align: bottom;" />
                    </td>
                    <th>
                        <span>决策人手机2</span>
                    </th>
                    <td>
                        <input type="text" runat="server" id="DecisionTel2" name="DecisionTel2" onkeypress="return(event.keyCode>47&&event.keyCode<58)"
                            onpaste="return !clipboardData.getData('text').match(/\D/)" maxlength="20" class="width35" />
                        <img id="btnDecisionTel2" onclick="CheckDecisionTel(2)" title="检查决策人手机是否存在?" alt="检查决策人手机是否存在?"
                            src="../../Images/search01.png" style="cursor: hand; vertical-align: bottom;" />
                        <img id="btnBaiduSearch_DecisionTel2" onclick="fnBaiduSearch('DecisionTel2');" title="百度搜索" alt="百度搜索" src="../../Images/baidu.png"
                            style="cursor: hand; vertical-align: bottom;" />
                        <img id="btnGoogleSearch_DecisionTel2" onclick="fnGoogleSearch('DecisionTel2');" title="Google搜索" alt="Google搜索" src="../../Images/google.png"
                            style="cursor: hand; vertical-align: bottom;" />
                    </td>
                </tr>
                <tr>
                    <th>
                        <span style="color: Red">*</span><span>决策人职位</span>
                    </th>
                    <td>
                        <input runat="server" type="text" id="DecisionPosition" onblur="IsChinese(this.value,'决策人职务','DecisionPosition')"
                            size="20" maxlength="20" name="DecisionPosition" class="width35" />
                    </td>
                    <th>
                        <span style="color: Red">*</span><span>公司电话1</span>
                    </th>
                    <td>
                        <input type="text" runat="server" id="Tel1" name="Tel1" onblur="IsTel(this.value,'公司电话1','Tel1')"
                            class="width35" />
                        <img id="btnBaiduSearch_Tel1" onclick="fnBaiduSearch('Tel1');" title="百度搜索" alt="百度搜索" src="../../Images/baidu.png"
                            style="cursor: hand; vertical-align: bottom;" />
                        <img id="btnGoogleSearch_Tel1" onclick="fnGoogleSearch('Tel1');" title="Google搜索" alt="Google搜索" src="../../Images/google.png"
                            style="cursor: hand; vertical-align: bottom;" />
                        <span class="span_font">格式:0755-12345678</span>
                    </td>
                </tr>
                <tr>
                    <th>
                        <span style="color: Red">*</span><span>主营业务</span>
                    </th>
                    <td>
                        <input runat="server" type="text" id="CompanyProduct" name="CompanyProduct" size="100"
                            maxlength="100" class="width35" />
                    </td>
                    <td colspan="2">&nbsp;</td>
                </tr>
            </table>
            <h3>
                公司基本信息</h3>
            <table class="table1">
                <tr>
                    <th width="14%">
                        <span style="color: Red">*</span><span>员工人数</span>
                    </th>
                    <td width="36%">
                        <asp:DropDownList ID="PersonId" runat="server" class="width38" AppendDataBoundItems="true">
                            <asp:ListItem Value=""></asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <th width="14%">
                        <span style="color: Red">*</span><span>客户区域</span>
                    </th>
                    <td width="36%">
                        <%--<asp:DropDownList ID="AreaId" runat="server" class="width38" AppendDataBoundItems="true">
                            <asp:ListItem Value=""></asp:ListItem>
                        </asp:DropDownList>--%>
                        <input type="hidden" id="AreaId" name="AreaId" runat="server" />
                        <input type="text" id="txtAreaId" runat="server" name="txtAreaId" readonly="readonly"
                            class="width35" />
                        <button id="btnAreaId" name="10" type="button" runat="server" class="btnCheck" style="height: 25px;">
                            选择</button>
                    </td>
                </tr>
                <tr>
                    <th>
                        <span style="color: Red">*</span><span>公司产值</span>
                    </th>
                    <td>
                        <asp:DropDownList ID="ProductId" runat="server" class="width38" AppendDataBoundItems="true">
                            <asp:ListItem Value=""></asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <th>
                        <span style="color: Red">*</span><span>所属行业</span>
                    </th>
                    <td>
                        <%--<asp:DropDownList ID="TradeId" runat="server" class="width38" AppendDataBoundItems="true">
                            <asp:ListItem Value=""></asp:ListItem>
                        </asp:DropDownList>--%>
                        <input type="hidden" id="TradeId" name="TradeId" runat="server" />
                        <input type="text" id="txtTradeId" runat="server" name="txtTradeId" readonly="readonly"
                            class="width35" />
                        <button id="btnTradeId" name="11" type="button" runat="server" class="btnCheck" style="height: 25px;">
                            选择</button>
                    </td>
                </tr>
                <tr>
                    <th>
                        <span style="color: Red">*</span><span>公司性质</span>
                    </th>
                    <td>
                        <asp:DropDownList ID="PropertyId" runat="server" class="width38" AppendDataBoundItems="true">
                            <asp:ListItem Value=""></asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <td colspan="2">
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <th>
                        <span>备注</span>
                    </th>
                    <td>
                        <textarea runat="server" id="Explains" name="Explains" onkeydown="showSetNum('Explains','ShowExplains',500)"
                            onkeyup="showSetNum('Explains','ShowExplains',500)" onblur="showSetNull('ShowExplains')"
                            style="width: 65%; height: 50px;"></textarea>
                        <span class="span_font">(0-500字)</span> <span class="span_font" id="ShowExplains">
                        </span>
                    </td>
                    <td colspan="2">
                        &nbsp;
                    </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;
                    </td>
                    <td colspan="3">
                        <input type="button" id="btnSaveToCustomer" value="保存并转到公海" class="btnCheck" onclick="SaveToCustomer()"
                            style="width: 100px; height: 23px;" />
                        &nbsp;&nbsp;
                        <input type="button" id="btnSave" value="保存" class="btnCheck" onclick="SaveCustomer()" style="width: 50px;
                            height: 23px;" />
                        &nbsp;&nbsp;
                        <input type="button" id="btnRubbish" value="废弃" class="btnCheck" onclick="SaveRubbish()"
                            style="width: 50px; height: 23px;" />
                        &nbsp;&nbsp;
                        <input type="button" id="btnStop" value="转向中间" class="btnCheck" onclick="SaveStop()"
                            style="width: 65px; height: 23px;" />
                        &nbsp;&nbsp;
                        <input type="button" id="btnReuturn" value="返回" class="btnCheck" onclick="SaveReturn()"
                            style="width: 50px; height: 23px;" />
                    </td>
                </tr>
            </table>
            <input type="hidden" id="ID" runat="server" />
        </div>
        <div id="dialog1" class="yui-pe-content">
            <div class="hd">
                废弃原因</div>
            <div class="bd">
                <iframe id="EditUIWindow1" frameborder="0" src="" style="width: 100%; height: 100%;
                    margin: 0px; padding: 0px;"></iframe>
            </div>
        </div>
        <div id="dialog6" class="yui-pe-content">
        <div class="hd">
            信息</div>
        <div class="bd">
            <iframe id="EditUIWindow6" frameborder="0" src="" style="width: 100%; height: 100%;
                margin: 0px; padding: 0px;"></iframe>
        </div>
    </div>
    </div>
    </form>
    <form id="form2" style="display: none" action="../../Extend/AjaxData/CustomOperating.aspx">
    <textarea style="display: none" id="jsonDataContent" rows="2" cols="2" name="jsonDataContent"></textarea>
    </form>
</body>
<script type="text/javascript">
    var flag = "<%=Flag %>";
    var type = "<%=Type %>", userid = "<%=UserID %>";
    //关闭当前页
    var closeWin = function () {
        window.parent.$("#tabs").tabs('close', '<%=PageTitle %>');
    }
    //百度搜索
    var fnBaiduSearch = function (id) {
        var txtValue = $("#" + id + "").val();
        if (txtValue == "") {
            $("#" + id + "").focus();
            return;
        } else {
            window.parent.$("#tabs").tabs('close', '百度搜索');
            var pagetitle = "百度搜索";
            parent.addTabs(pagetitle, 'http://www.baidu.com/baidu?tn=baidu&ie=UTF-8&word=' + txtValue);
            parent.NeedRefreshPage = this;
            //parent.window.open("http://www.baidu.com/baidu?tn=baidu&ie=UTF-8&word="+encodeURI(txtCustomerName));
        }
    }
    //Google搜索
    var fnGoogleSearch = function (id) {
        var txtValue = $("#" + id + "").val();
        if (txtValue == "") {
            $("#" + id + "").focus();
            return;
        } else {
            parent.window.open("http://www.google.com.hk/search?hl=zh-CN&newwindow=1&safe=strict&tbo=d&q=" + encodeURI(txtValue));
        }
    }
</script>
<script src="../../Scripts/appjs/model.<% =EntityName %>.js" type="text/javascript"
    language="javascript"></script>
</html>
